package com.fr.report.web.ui.reg;

import com.fr.base.StringUtils;
import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLableReader;

public class CustomReg extends AbstractReg
{
  public static final String XML_TAG = "CusReg";
  private String regText;

  public CustomReg()
  {
  }

  public CustomReg(String paramString)
  {
    setRegText(paramString);
  }

  public void setRegText(String paramString)
  {
    this.regText = paramString;
  }

  public String toRegText()
  {
    return this.regText;
  }

  public boolean equals(Object paramObject)
  {
    return paramObject instanceof CustomReg;
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    super.readXML(paramXMLableReader);
    if (paramXMLableReader.isChildNode())
    {
      String str = paramXMLableReader.getTagName();
      if (str.equals("CusReg"))
        this.regText = paramXMLableReader.getAttr("ct");
    }
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
    super.writeXML(paramXMLPrintWriter);
    if (!(StringUtils.isEmpty(this.regText)))
      paramXMLPrintWriter.startTAG("CusReg").attr("ct", this.regText).end();
  }
}